package com.huffman.smart_picture.utils;

import com.huffman.smart_picture.common.exception.BusinessException;
import com.huffman.smart_picture.common.exception.ErrorEnum;
import com.squareup.okhttp.internal.framed.ErrorCode;

public class ThrowUtil {
    public static void throwIf(boolean condition,String message,String description){
        if (condition){
            throw new BusinessException(message,description);
        }
    }

    public static void throwIf(boolean condition, ErrorEnum errorEnum, String description){
        if (condition) {
            throw new BusinessException(errorEnum,description);
        }
    }
}
